﻿var appinitsuccess;
var init = function (callback) {
    if (window.plus) {
        plusinit = true;
    }
    if (plusinit) {
        if (!appinitsuccess) {/*验证是否关闭启动界面*/
            plus.webview.getLaunchWebview().evalJS("InitComplete()");
            appinitsuccess = true;
        }
    }
    else {
        var plusinitinterval = setInterval(function () {
            if (plusinit) {
                clearInterval(plusinitinterval);
                if (!appinitsuccess) {/*验证是否关闭启动界面*/
                    plus.webview.getLaunchWebview().evalJS("InitComplete()");
                    appinitsuccess = true;
                }
            }
        }, 200)
    }
    var hrefinterval = setInterval(function () {
        if (appinitsuccess) {
            window.location.href = 'https://wei.youlijinfu.com/weihu/'
            clearInterval(hrefinterval);
        }
    }, 20)
}

if (window.plus) {
    init();
} else {
    document.addEventListener('plusready', init, false);
    // window.location.href = 'https://wei.youlijinfu.com/weihu/';
}
